export interface LoginRequestData {
  /** admin 或 editor */
  email: string
  /** 密码 */
  password: string
  captchaId:string
  /** 验证码 */
  captcha: string
}

export type LoginCodeResponseData = ApiResponseData<string>

export type LoginResponseData = ApiResponseData<{ token: string }>
type Permission = {
  id: number;
  name: string;
  description: string;
  path:string;
  url: string;
  parentId: string;
  order: number;
  icon: string | null;
  type: number;
  children: Permission[];
};

export type UserInfoResponseData = ApiResponseData<{
  nickname: string;
  username: string;
  email: string;
  roles: { id: number; name: string}[];
  permissions: Permission[];
}>
